<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="node_modules/vue/dist/vue.min.js"></script>
    <script src="node_modules/mockjs/dist/mock-min.js"></script>
    <link rel="stylesheet" href="./index.css">
    <link rel="stylesheet" href="node_modules/animate.css/animate.min.css">
    <title>2018/12/6</title>
    <!--好的代码像粥一样,是得用时间和精力熬的。-->
</head>
<body>
    <div id="root" v-cloak>
        <section-counter></section-counter>
    </div>
</body>
<script type="text/x-template" id="section-counter">
    <div>
        <header>
            <section class="main">
                    <label>ToDoList</label>
                    <!--lazy添加完之后再传入值-->
                    <input type="text"  placeholder="添加ToDo" required="required"  v-model.lazy="content"  @keyup.enter="add(content)">
            </section>
        </header>
        <section>
            <h2>正在进行<span>{{id}}</span></h2>
            <ol v-if="!!edit.length">
                <li v-for="(item,key) in edit" :key="item.content" class="animated flipInX">
                    <input type="checkbox" @click="del(key)">
                    <p >{{item.content}}</p>
                    <a href.prevent=" "  @click="delete1(key)">-</a>
                </li>
            </ol>
            <h2>已经完成<span>{{num}}</span></h2>
            <ul>
                <li v-for="(item,key) in edit2" class="animated bounceIn" :key="item.content">
                    <input type="checkbox" @click="dele(key)" checked="checked">
                    <p>{{item.content}}</p>
                    <a  @click="delete2(key)">-</a>
                </li>
            </ul>
        </section>
        <footer>
            Copyright &copy; 2014 todolist.cn <a @click="clear()">clear</a>
        </footer>
    </div>
</script>
<script src="index.js"></script>
</html>
